import os
from typing import Dict, Any
from pydantic import BaseModel, Optional


class Config(BaseModel):
    default_model : str = os.getenv("LLM_MODEL_ID")
    model_provider : str = os.getenv("LLM_PROVIDER")
    temperature : float =  os.getenv("LLM_TEMPERATURE")
    max_tokens : Optional[int] = None

    debug : bool = os.getenv("LLM_DEBUG")
    log_level : str = os.getenv("LLM_LOG_LEVEL")

    max_history_length : int =  os.getenv("LLM_MAX_HISTORY_LENGTH")


def to_dict(self) -> Dict[str, Any]:
        return self.dict()
